#pragma once

#include "align/align.h"
#include "array/array.h"
#include "boolean_operation/boolean_operation.h"
#include "break_up/break_up.h"
#include "center_line/center_line.h"
#include "clipping/clipping.h"
#include "decompose/decompose.h"
#include "delete/delete.hpp"
#include "drift/drift.h"
#include "extension/extension.h"
#include "fillet_tool/fillet_tool.h"
#include "layer_ref/layer_ref.h"
#include "line_add_corner/line_add_corner.h"
#include "move/move.hpp"
#include "qbe/src/ecs/app.hpp"
#include "rotation/rotation.hpp"
#include "save_as_cell/save_as_cell.h"
#include "show_hide_layer_cell/show_hide_layer_cell.h"
#include "stretch/stretch.h"

#include "affix/affix.hpp"
#include "copy/copy.hpp"
#include "merge/merge.hpp"
#include "mirror/mirror.hpp"
#include "shear/shear.hpp"
#include "slice/slice.hpp"
#include "squid_zline/squid_zline.hpp"

#include "quick_align/quick_align.hpp"

#include "remove_ruler_pin/remove_ruler_pin.hpp"

namespace qbe::editing {

class EditingPlugin : public ecs::Plugin {
 public:
  void build(ecs::App& app) override {
    LineAddCorner::LineAddCornerPlugin line_add_corner_plugin;
    app.add_plugins(line_add_corner_plugin);
    ShowHideLayerCell::ShowHideLayerCellPlugin show_hide_layer_plugin;
    app.add_plugins(show_hide_layer_plugin);
    app.add_plugins(LayerRef::LayerRefPlugin());
    app.add_plugins(Decompose::DecomposePlugin());
    app.add_plugins(Drift::DriftPlugin());
    app.add_plugins(Clipping::ClippingPlugin());      //修剪
    app.add_plugins(Extension::ExtensionPlugin());    //延伸
    FilletTool::FilletToolPlugin fillet_tool_plugin;  //圆角工具
    app.add_plugins(fillet_tool_plugin);
    BreakUp::BreakUpPlugin break_up_plugin;  //打散
    app.add_plugins(break_up_plugin);
    SaveAsCell::SaveAsCellPlugin save_as_cell_plugin;  //另存为单元
    app.add_plugins(save_as_cell_plugin);
    Array::ArrayPlugin array_plugin;  //阵列
    app.add_plugins(array_plugin);
    Stretch::StretchPlugin stretch_plugin;  //拉伸
    app.add_plugins(stretch_plugin);
    app.add_plugins(centerline::CenterLinePlugin());

    app.add_plugins(move::Plugin());
    app.add_plugins(quickAlign::Plugin());
    app.add_plugins(rotation::Plugin());
    app.add_plugins(dele::Plugin());

    app.add_plugins(copy::Plugin());
    app.add_plugins(affix::Plugin());
    app.add_plugins(shear::Plugin());
    app.add_plugins(mirror::Plugin());
    app.add_plugins(slice::Plugin());
    app.add_plugins(merge::Plugin());
    app.add_plugins(squidZline::Plugin());
    app.add_plugins(Remove_ruler_pin::Plugin());

    BooleanOperation::BooleanOperationPlugin boolean_operation_plugin;  //布尔运算
    app.add_plugins(boolean_operation_plugin);

    Align::AlignPlugin align_plugin;
    app.add_plugins(align_plugin);
  }
};

}  // namespace qbe::editing
